<template>
  <div >
      <van-row class="aa">
  <van-col span="24"><headress/></van-col>
</van-row>
      <van-row>
  <van-col span="8"><left/></van-col>
  <van-col span="16">
      <van-uploader :after-read="upload">导入</van-uploader>
      <van-button @click="add">导出</van-button>
  </van-col>
</van-row>
 


  </div>
</template>

<script>
import left from "../com/left.vue"
import headress from "../com/headress.vue"
import axios from 'axios'
export default {
    components:{ left,headress },
    methods:{
        upload(file){
            let formData = new FormData()
            formData.append('file',file.file)
            console.log(formData);
            axios({url:"http://127.0.0.1:5000/upload",method:'post',data:formData}).then(res=>{
                console.log(res);
            })
 
        },
        add(){
            axios({url:"http://127.0.0.1:5000/download",methods:"post"}).then(res=>{
                console.log(res);
            })
        }
    }


}
</script>

<style>
.aa{
    text-align: right;
    background-color: royalblue;
    height: 60px;
}
</style>